#coding=utf-8
import sys
sys.path.append("/root/xiao/project/")
from flask import Flask, render_template
from webserver.services.getcurres import GetCurRes
from webserver.services.gethistory import GetHisData
#创建一个flask 实例，后面自定义一个网页页面存储位置
app = Flask(__name__,template_folder='./views/',static_folder='./public/')
#接口返回数据为中文下禁止转换
app.config['JSON_AS_ASCII']=False
@app.route('/')
def getroothtml():
    return "helloworld"

@app.route('/getcurresult')
def getcurresult():
    return GetCurRes().getcurres()

@app.route('/gethistorydata')
def gethistory():
    return GetHisData().gethistory()

if __name__ == "__main__":
    app.run(host="0.0.0.0",port=3000,debug=True)
